package com.yiyuan.app.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.guaike.core.mybatis.plugins.BaseDAO;
import com.yiyuan.app.entity.po.GDeviceStatusPO;
import com.yiyuan.app.mapper.GDeviceStatusMapper;
import org.springframework.stereotype.Repository;

@Repository
public class GDeviceStatusDAO extends BaseDAO<GDeviceStatusMapper, GDeviceStatusPO> {

    public int delete(String channelId, String clientId) {
        LambdaQueryWrapper<GDeviceStatusPO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(GDeviceStatusPO::getChannelId, channelId);
        queryWrapper.eq(GDeviceStatusPO::getClientId, clientId);
        return getBaseMapper().delete(queryWrapper);
    }
}
